package com.raising.sc.service;

import com.raising.sc.util.HttpRequest;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Api(description = "服务A控制层")
@RestController
public class ServiceAController {

    @ApiOperation("这是一个操作")
    @RequestMapping(value = "/hi",method = {RequestMethod.GET,RequestMethod.POST})
    public String a(@ApiParam("这个是参数") String str) {
        //发送 GET 请求
        String s = HttpRequest.sendGet("http://localhost:30001/hi", "str=" + str);
        return s;
    }

}
